import request from '@/utils/request'

// 查询fabric列表
export function listFabric(query) {
  return request({
    url: '/clothing/fabric/list',
    method: 'get',
    params: query
  })
}

// 查询fabric详细
export function getFabric(id) {
  return request({
    url: '/clothing/fabric/' + id,
    method: 'get'
  })
}

// 新增fabric
export function addFabric(data) {
  return request({
    url: '/clothing/fabric',
    method: 'post',
    data: data
  })
}

// 修改fabric
export function updateFabric(data) {
  return request({
    url: '/clothing/fabric',
    method: 'put',
    data: data
  })
}

// 删除fabric
export function delFabric(id) {
  return request({
    url: '/clothing/fabric/' + id,
    method: 'delete'
  })
}
